<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <title>项目绑定</title>
    <script type="text/javascript">
        $(window).on('load', function () {
            $('.selectpicker').selectpicker({
                'selectedText': 'cat'
            });  
        });
 
    </script>
</head>

<body>
<div class="container">

	<div id="content" class="well">
	
        <form:form id="form" class="form-horizontal" role="form" modelAttribute="voModel" action="${ctx}/bindProject/bind.do" method="post">
            <c:choose>
                <c:when test="${type eq 'info'}">
                    <div class="alert alert-info alert-dismissable">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                        <strong>系统提示!</strong><br/>
                        ${infoMsg}
                    </div>
                </c:when>
                <c:when test="${type eq 'error'}">
                    <div class="alert alert-warning alert-dismissable">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                        <strong>错误提示!</strong><br/>
                        <form:errors path="*"/>
                        ${errotMsg}
                    </div>
                </c:when>
            </c:choose>
            
            <div class="form-group">
                <label for="userID" class="col-sm-3 control-label">人员选择</label>
                <div class="col-sm-9">
                	<select class="selectpicker form-control" name="userID" placeholder="请选择人员">
						<c:forEach var="userBean" items="${userList}">
					 		<option value="${userBean.id}">${userBean.name}</option>
					 	</c:forEach>
					</select>
                </div>
            </div>
            
            <div class="form-group">
                <label for="projectID" class="col-sm-3 control-label">项目选择</label>
                <div class="col-sm-9">
                    <select class="selectpicker form-control" name="projectID" placeholder="请选择项目">
				 		<c:forEach var="projectBean" items="${projectList}">
				 			<option value="${projectBean.projectID}">${projectBean.communityName}-${projectBean.communityNum}</option>
				 		</c:forEach>
				  	</select>
                </div>
            </div>
            
            <div class="form-group">
                <label for="roleID" class="col-sm-3 control-label">角色选择</label>
                <div class="col-sm-9">
                    <select class="selectpicker form-control" name="roleID" placeholder="请选择角色">
				 		<c:forEach var="roleBean" items="${roleList}">
				 			<option value="${roleBean.roleID}">${roleBean.roleName}</option>
				 		</c:forEach>
				  	</select>
                </div>
            </div>
            
            <div class="btnArea">
                <input class="btn btn-lg btn-primary btn-block" type="submit" name="submit" value="绑定" />
            </div>
            
            
        </form:form>

	</div>
</div>
</body>
</html>
